<template>
  <view class="container">
    <view class="header_txt">
      <view class="back"
            @click="backHandler">
        <image src="/static/img/back3.png"></image>
      </view>
      <view class="title"> 订单支付 </view>
    </view>
    <view class="content">
      <view class="item_box">
        <view class="top_item">
          <view class="top_price text-bold">￥{{paymoney}}</view>
          <!-- <view class="top_ordernum">订单编号：1654684897</view> -->
        </view>
        <view class="pay_title">
          <view class="pay_line"></view>
          支付信息
        </view>
        <view class="pay_item"
              @click="choosetype(2)">
          <image class="pay_icon1"
                 src="../../static/image/ico_wx@2x.png"></image>
          <view class="pay_title">微信支付</view>
          <view class="pay_selicon">
            <image src="../../static/image/ddjs_ico_xz_sel@2x.png"
                   v-if="type==2"></image>
            <image src="../../static/image/ddjs_ico_xz_nor@2x.png"
                   v-else></image>
          </view>
        </view>
        <view class="pay_item"
              @click="choosetype(1)">
          <image class="pay_icon"
                 src="../../static/image/ico_zfb@2x.png"></image>
          <view class="pay_title">支付宝支付</view>
          <view class="pay_selicon">
            <image src="../../static/image/ddjs_ico_xz_sel@2x.png"
                   v-if="type==1"></image>
            <image src="../../static/image/ddjs_ico_xz_nor@2x.png"
                   v-else></image>
          </view>
        </view>
        <view class="pay_item"
              @click="choosetype(3)"
              style="border-bottom:none">
          <image class="pay_icon"
                 src="../../static/image/ico_ye@2x.png"></image>
          <view class="pay_title">余额支付</view>
          <view class="pay_selicon">
            <image src="../../static/image/ddjs_ico_xz_sel@2x.png"
                   v-if="type==3"></image>
            <image src="../../static/image/ddjs_ico_xz_nor@2x.png"
                   v-else></image>
          </view>
        </view>
      </view>
      <view class="btns"
            v-if="type==3"
            @click="tomima">立即支付</view>
      <view class="btns"
            v-else
            @click="goPay">立即支付</view>
      <!-- 支付密码 -->
      <!-- <passkeyborad :show="show"
                    @close="close"
                    @makesure="makesure"></passkeyborad> -->
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      type: 2,
      // show: false,
      show: { showStatus: false },
      ordernumber: '',
      paymoney: '',
      pagetype: '',
      viptype: '',
      id: '',
      pay_pwd: ''
    }
  },
  onLoad(option) {
    this.paymoney = option.money
    this.viptype = option.type
    this.id = option.id
    this.getUserInfo()
  },
  methods: {
    backHandler() {
      uni.navigateBack({
        delta: 1
      })
    },
    async getUserInfo() {
      const { data } = await this.$http.post('/user/get_user_info')
      console.log(data)
    }
  }
}
</script>

<style lang="scss">
/* 头部区域 */
.header_txt {
  width: 750rpx;
  overflow: hidden;
  height: 88rpx;
  line-height: 88rpx;
  background-color: #fff;

  .back {
    position: absolute;
    top: 14rpx;
    left: 14rpx;
    width: 60rpx;
    height: 60rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    image {
      width: 48rpx;
      height: 48rpx;
    }
  }

  .right {
    position: absolute;
    top: 14rpx;
    right: 14rpx;
    width: 60rpx;
    height: 60rpx;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .title {
    text-align: center;
    height: 88rpx;
    // margin-top: -20rpx;
    // line-height: 88rpx;
    font-size: 32rpx;
    font-weight: bold;
  }
}
.content {
  width: 100vw;
  height: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
}
.top-kong {
  width: 100%;
  height: var(--status-bar-height);
  background-color: #ffffff;
}

.border {
  width: 100%;
  height: 100rpx;
  padding: 0 30rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
}

.border image {
  width: 20rpx;
  height: 36rpx;
}

.border_start {
  display: flex;
  align-items: center;
}

.border_title {
  font-size: 34rpx;
  font-family: PingFang SC;
  font-weight: 500;
  color: #303030;
}

.border_end {
  font-size: 28rpx;
  font-family: PingFang SC;
  font-weight: 500;
  color: #333333;
  text-align: end;
}

.border_end image {
  width: 33rpx;
  height: 36rpx;
}

.item_box {
  width: 100%;
  height: 700rpx;
  background: #ffffff;
  border-radius: 10rpx;
  margin: 0 auto;
  overflow: hidden;
}

.top_item {
  width: 100%;
  height: 300rpx;
  color: #ff4145;
  font-size: 72rpx;
  background-color: #f5f5f5;
  text-align: center;
  padding: 80rpx;
}

.top_price {
  font-size: 72rpx;
  font-weight: bold;
  color: #ff4145;
}

.top_ordernum {
  font-size: 24rpx;
  color: #333333;
}

.pay_item {
  width: 96%;
  height: 100rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: solid 1rpx #e5e5e5;
  margin-left: 4%;
  padding-right: 30rpx;
}

.pay_title {
  width: 530rpx;
  height: 100rpx;
  display: flex;
  align-items: center;
  font-size: 28rpx;
}

.pay_title1 {
  width: 530rpx;
  height: 100rpx;
  display: flex;
  align-items: center;
  font-size: 28rpx;
}

.pay_icon {
  width: 38rpx;
  height: 40rpx;
}
.pay_icon1 {
  width: 40rpx;
  height: 35rpx;
}

.pay_selicon {
  width: 36rpx;
  height: 36rpx;
}

.pay_selicon image {
  width: 36rpx;
  height: 36rpx;
}

.btns {
  width: 86%;
  height: 88rpx;
  background: #ffdd47;
  border-radius: 10rpx;
  margin: 80rpx auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30rpx;
  color: #333333;
  position: absolute;
  bottom: 3%;
  left: 6.7%;
}

.njpns {
  width: 36rpx;
  height: 36rpx;
}
.pay_title {
  width: 100%;
  height: 100rpx;
  padding: 0 30rpx;
  font-size: 28rpx;
  font-family: PingFang SC;
  font-weight: 500;
  color: #333333;
}
.pay_line {
  width: 4rpx;
  height: 20rpx;
  background: #ffdd47;
  border-radius: 2rpx;
  margin-right: 10rpx;
}
</style>

